﻿<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="Equipment.DataAccess" %>
<%@ Import Namespace="Equipment.Business" %>
<table class="data-table">
    <tr>
        <th>
        Select All
        </th>
        <th>
            Work Order #
        </th>
        <th>
            Type of Work Order
        </th>
        <th>
            Description
        </th>
        <th>
            Date Oppened
        </th>
        <th>
            Date Due
        </th>
        <th>
            Assign To
        </th>
    </tr>
    <% For Each item As WorkOrder In ViewData("WorkOrderList")%>
    <tr>
        <td>
            <%= Html.CheckBox(String.Format("cbxWorkOrder_{0}", item.ID))%>
        </td>
        <td>
            <%: Html.ActionLink(item.ID, "Edit", New With {.id = item.ID})%>
        </td>
        <td>
            <%= RequirementTypeLookup.GetDescriptionByType(item.RequirementType)%>
        </td>
        <td>
            <%: item.Description%>
        </td>
        <td>
            <%: TimeZoneManager.ConvertToUserTimeStringFor(item.DateOpened)%>
        </td>
        <td>
            <%: TimeZoneManager.ConvertToUserTimeStringFor(item.DateDue)%>
        </td>
        <td>
            <%= String.Join(", ", item.Groups.Select(Function(g) g.Description))%>
        </td>
    </tr>
    <% Next%>
</table>
